<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>端API</title>
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../css/style.css" />
    <script type="text/javascript" src="../script/api.js"></script>
    <style>
        .empty {
            text-align: center;
            padding: 50px 0;
        }
        .top{
        	width:100%;
        	height: 50px;
          line-height: 50px;
        	margin: 0 auto;
        	background: #0082E4;
        	color:#FFFFFF;
        	border:0px;
        	display: block;
        	font-size: 14px;
        	text-align: center;
        }
        .content{
        	width:100%;
        	height: 250px;
        	margin: 0 auto;
        	margin-top: 50px;
        	background: white;
        	color:#000000;
        	border:0px;
        	display: block;
        	font-size: 14px;
        }

        .button {
        	width:60%;
        	height: 100px;
        	margin: 0 auto;
        	margin-top: 15px;
        	background: #0082E4;
        	color:#FFFFFF;
        	font-size: 18px;
        	border:0px;
        	display: block;
          border-radius: 8px;
        }
    </style>
</head>

<body>
    <div class="empty">


      <div class="top">
        <h1 class="top-title">雇主 or 接单员</h1>
      </div>
      <div class="content">
          <button class="button" onclick="tiaozhuan_xiadan();">我 要 下 单</button><br>
          <button class="button" onclick="tiaozhuan_jiedan();">我 要 接 单</button>

      </div>

    </div>



</body>

</html>

<script type="text/javascript">

  function tiaozhuan_xiadan() {
    api.openWin({
		        name: 'xiadan',
		        url: 'frame1/xiadan.html',
		        opaque: true,
		        vScrollBarEnabled: false
		});
  }

  function tiaozhuan_jiedan() {
    var user = $api.getStorage('user');
    if(user[0].isdelivery){
    api.openWin({
		        name: 'jiedan',
		        url: 'frame1/jiedan.html',
		        opaque: true,
		        vScrollBarEnabled: false
		});
   }else {
		  alert('未注册，请注册成为捎货人');
		}
  }



</script>
